"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = __importDefault(require("express"));
const multer_1 = __importDefault(require("multer"));
const userhandle_1 = __importDefault(require("./handle/userhandle"));
const reg_1 = __importDefault(require("./middleware/reg"));
const file_1 = require("./middleware/file");
const config_1 = require("../config");
const isroot_1 = __importDefault(require("./middleware/isroot"));
const upload_1 = __importDefault(require("./middleware/upload@"));
const router = express_1.default.Router();
router.post("/login", reg_1.default.user, userhandle_1.default.login);
router.post("/registry", reg_1.default.user, userhandle_1.default.registry);
router.get("/isname", userhandle_1.default.isname);
router.post("/userimg", (0, multer_1.default)({ storage: file_1.storage }).single(config_1.filestr), upload_1.default, userhandle_1.default.userimg);
router.post("/articleimg", (0, multer_1.default)({ storage: file_1.storage }).single(config_1.filestr), upload_1.default, userhandle_1.default.articleimg);
router.post("/theftarticleimg", (0, multer_1.default)({ storage: file_1.storage }).single(config_1.filestr), upload_1.default, userhandle_1.default.theftarticleimg);
router.post("/getuserlist", isroot_1.default, userhandle_1.default.getuserlist);
router.post("/rightchange", isroot_1.default, userhandle_1.default.changeright);
exports.default = router;
